package com.zsrt.t09;

import org.junit.Test;

public class T09 {
	/**
	 * 冒泡排序
	 */
	@Test
	public void test(){
		int[] arrays={34,65,23,12,80,99,100};
	    for(int i=0;i<=arrays.length-1;i++){
	    	for(int j=0;j<=i;j++){
	    		int a=arrays[i];
	    		int b=arrays[j];
	    		if(a<b){
	    			int sunwei=arrays[i];
	    			arrays[i]=arrays[j];
	    			arrays[j]=sunwei;
	    		}
	    	}
	    }
	    for(int sunwei=0;sunwei<=arrays.length-1;sunwei++){
	    	System.out.println(arrays[sunwei]);
	    }
	}



}
